package com.scy.java.io.file;

import java.io.File;
import java.io.FilenameFilter;

public class ImageFilter implements FilenameFilter {
    @Override
    public boolean accept(File dir, String name) {
        //允许指定文件
        return name.endsWith(".zip") ||name.endsWith(".doc")
                ||name.endsWith(".txt")||name.endsWith(".png");
    }
}
